<!-- HTML header for doxygen 1.8.3.1-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.4"/>
<title>CUB: Thread</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="extra_stylesheet.css" rel="stylesheet" type="text/css"/>
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
<script type="text/javascript">
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-38890655-1']);
  _gaq.push(['_trackPageview']);
  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
</script>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">CUB
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.4 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Groups</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a>  </div>
  <div class="headertitle">
<div class="title">Thread</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structcub_1_1_cast.html">cub::Cast&lt; B &gt;</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default cast functor.  <a href="structcub_1_1_cast.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structcub_1_1_equality.html">cub::Equality</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default equality functor.  <a href="structcub_1_1_equality.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structcub_1_1_inequality.html">cub::Inequality</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default inequality functor.  <a href="structcub_1_1_inequality.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structcub_1_1_max.html">cub::Max</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default max functor.  <a href="structcub_1_1_max.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structcub_1_1_min.html">cub::Min</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default min functor.  <a href="structcub_1_1_min.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structcub_1_1_sum.html">cub::Sum</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default sum functor.  <a href="structcub_1_1_sum.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="member-group"></a>
Sequential reduction over statically-sized array types</h2></td></tr>
<tr class="memitem:ga48320d1f549b7931ae1f72040f9e42dc"><td class="memTemplParams" colspan="2">template&lt;int LENGTH, typename T , typename ReductionOp &gt; </td></tr>
<tr class="memitem:ga48320d1f549b7931ae1f72040f9e42dc"><td class="memTemplItemLeft" align="right" valign="top">__device__ __forceinline__ T&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group___thread_module.html#ga48320d1f549b7931ae1f72040f9e42dc">cub::ThreadReduce</a> (T *input, ReductionOp reduction_op, T prefix)</td></tr>
<tr class="memdesc:ga48320d1f549b7931ae1f72040f9e42dc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Perform a sequential reduction over <code>LENGTH</code> elements of the <code>input</code> array, seeded with the specified <code>prefix</code>. The aggregate is returned.  <a href="#ga48320d1f549b7931ae1f72040f9e42dc">More...</a><br/></td></tr>
<tr class="separator:ga48320d1f549b7931ae1f72040f9e42dc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaeafffc414146089dec3bf734a0022b23"><td class="memTemplParams" colspan="2">template&lt;int LENGTH, typename T , typename ReductionOp &gt; </td></tr>
<tr class="memitem:gaeafffc414146089dec3bf734a0022b23"><td class="memTemplItemLeft" align="right" valign="top">__device__ __forceinline__ T&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group___thread_module.html#gaeafffc414146089dec3bf734a0022b23">cub::ThreadReduce</a> (T *input, ReductionOp reduction_op)</td></tr>
<tr class="memdesc:gaeafffc414146089dec3bf734a0022b23"><td class="mdescLeft">&#160;</td><td class="mdescRight">Perform a sequential reduction over <code>LENGTH</code> elements of the <code>input</code> array. The aggregate is returned.  <a href="#gaeafffc414146089dec3bf734a0022b23">More...</a><br/></td></tr>
<tr class="separator:gaeafffc414146089dec3bf734a0022b23"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa532e530f559bb9922754bd610f5fe84"><td class="memTemplParams" colspan="2">template&lt;int LENGTH, typename T , typename ReductionOp &gt; </td></tr>
<tr class="memitem:gaa532e530f559bb9922754bd610f5fe84"><td class="memTemplItemLeft" align="right" valign="top">__device__ __forceinline__ T&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group___thread_module.html#gaa532e530f559bb9922754bd610f5fe84">cub::ThreadReduce</a> (T(&amp;input)[LENGTH], ReductionOp reduction_op, T prefix)</td></tr>
<tr class="memdesc:gaa532e530f559bb9922754bd610f5fe84"><td class="mdescLeft">&#160;</td><td class="mdescRight">Perform a sequential reduction over the statically-sized <code>input</code> array, seeded with the specified <code>prefix</code>. The aggregate is returned.  <a href="#gaa532e530f559bb9922754bd610f5fe84">More...</a><br/></td></tr>
<tr class="separator:gaa532e530f559bb9922754bd610f5fe84"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5d4d3204c873db5af48a3a3f831a9ef8"><td class="memTemplParams" colspan="2">template&lt;int LENGTH, typename T , typename ReductionOp &gt; </td></tr>
<tr class="memitem:ga5d4d3204c873db5af48a3a3f831a9ef8"><td class="memTemplItemLeft" align="right" valign="top">__device__ __forceinline__ T&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group___thread_module.html#ga5d4d3204c873db5af48a3a3f831a9ef8">cub::ThreadReduce</a> (T(&amp;input)[LENGTH], ReductionOp reduction_op)</td></tr>
<tr class="memdesc:ga5d4d3204c873db5af48a3a3f831a9ef8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Serial reduction with the specified operator.  <a href="#ga5d4d3204c873db5af48a3a3f831a9ef8">More...</a><br/></td></tr>
<tr class="separator:ga5d4d3204c873db5af48a3a3f831a9ef8"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="member-group"></a>
Sequential prefix scan over statically-sized array types</h2></td></tr>
<tr class="memitem:ga37fa2b0ca9bb32096517480e98894545"><td class="memTemplParams" colspan="2">template&lt;int LENGTH, typename T , typename ScanOp &gt; </td></tr>
<tr class="memitem:ga37fa2b0ca9bb32096517480e98894545"><td class="memTemplItemLeft" align="right" valign="top">__device__ __forceinline__ T&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group___thread_module.html#ga37fa2b0ca9bb32096517480e98894545">cub::ThreadScanExclusive</a> (T *input, T *output, ScanOp scan_op, T prefix, bool apply_prefix=true)</td></tr>
<tr class="memdesc:ga37fa2b0ca9bb32096517480e98894545"><td class="mdescLeft">&#160;</td><td class="mdescRight">Perform a sequential exclusive prefix scan over <code>LENGTH</code> elements of the <code>input</code> array, seeded with the specified <code>prefix</code>. The aggregate is returned.  <a href="#ga37fa2b0ca9bb32096517480e98894545">More...</a><br/></td></tr>
<tr class="separator:ga37fa2b0ca9bb32096517480e98894545"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga145ad5e3b05134aef8d86f84df9c25b8"><td class="memTemplParams" colspan="2">template&lt;int LENGTH, typename T , typename ScanOp &gt; </td></tr>
<tr class="memitem:ga145ad5e3b05134aef8d86f84df9c25b8"><td class="memTemplItemLeft" align="right" valign="top">__device__ __forceinline__ T&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group___thread_module.html#ga145ad5e3b05134aef8d86f84df9c25b8">cub::ThreadScanExclusive</a> (T(&amp;input)[LENGTH], T(&amp;output)[LENGTH], ScanOp scan_op, T prefix, bool apply_prefix=true)</td></tr>
<tr class="memdesc:ga145ad5e3b05134aef8d86f84df9c25b8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Perform a sequential exclusive prefix scan over the statically-sized <code>input</code> array, seeded with the specified <code>prefix</code>. The aggregate is returned.  <a href="#ga145ad5e3b05134aef8d86f84df9c25b8">More...</a><br/></td></tr>
<tr class="separator:ga145ad5e3b05134aef8d86f84df9c25b8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4004b2a6bfb2b4f024b0389e9c46074c"><td class="memTemplParams" colspan="2">template&lt;int LENGTH, typename T , typename ScanOp &gt; </td></tr>
<tr class="memitem:ga4004b2a6bfb2b4f024b0389e9c46074c"><td class="memTemplItemLeft" align="right" valign="top">__device__ __forceinline__ T&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group___thread_module.html#ga4004b2a6bfb2b4f024b0389e9c46074c">cub::ThreadScanInclusive</a> (T *input, T *output, ScanOp scan_op)</td></tr>
<tr class="memdesc:ga4004b2a6bfb2b4f024b0389e9c46074c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Perform a sequential inclusive prefix scan over <code>LENGTH</code> elements of the <code>input</code> array. The aggregate is returned.  <a href="#ga4004b2a6bfb2b4f024b0389e9c46074c">More...</a><br/></td></tr>
<tr class="separator:ga4004b2a6bfb2b4f024b0389e9c46074c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae78193279081a554432b6aea10a7295a"><td class="memTemplParams" colspan="2">template&lt;int LENGTH, typename T , typename ScanOp &gt; </td></tr>
<tr class="memitem:gae78193279081a554432b6aea10a7295a"><td class="memTemplItemLeft" align="right" valign="top">__device__ __forceinline__ T&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group___thread_module.html#gae78193279081a554432b6aea10a7295a">cub::ThreadScanInclusive</a> (T(&amp;input)[LENGTH], T(&amp;output)[LENGTH], ScanOp scan_op)</td></tr>
<tr class="memdesc:gae78193279081a554432b6aea10a7295a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Perform a sequential inclusive prefix scan over the statically-sized <code>input</code> array. The aggregate is returned.  <a href="#gae78193279081a554432b6aea10a7295a">More...</a><br/></td></tr>
<tr class="separator:gae78193279081a554432b6aea10a7295a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0e00b3a9b522249581b2ff98f670087b"><td class="memTemplParams" colspan="2">template&lt;int LENGTH, typename T , typename ScanOp &gt; </td></tr>
<tr class="memitem:ga0e00b3a9b522249581b2ff98f670087b"><td class="memTemplItemLeft" align="right" valign="top">__device__ __forceinline__ T&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group___thread_module.html#ga0e00b3a9b522249581b2ff98f670087b">cub::ThreadScanInclusive</a> (T *input, T *output, ScanOp scan_op, T prefix, bool apply_prefix=true)</td></tr>
<tr class="memdesc:ga0e00b3a9b522249581b2ff98f670087b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Perform a sequential inclusive prefix scan over <code>LENGTH</code> elements of the <code>input</code> array, seeded with the specified <code>prefix</code>. The aggregate is returned.  <a href="#ga0e00b3a9b522249581b2ff98f670087b">More...</a><br/></td></tr>
<tr class="separator:ga0e00b3a9b522249581b2ff98f670087b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gadb4aed8a804827b6fb97eca790572099"><td class="memTemplParams" colspan="2">template&lt;int LENGTH, typename T , typename ScanOp &gt; </td></tr>
<tr class="memitem:gadb4aed8a804827b6fb97eca790572099"><td class="memTemplItemLeft" align="right" valign="top">__device__ __forceinline__ T&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group___thread_module.html#gadb4aed8a804827b6fb97eca790572099">cub::ThreadScanInclusive</a> (T(&amp;input)[LENGTH], T(&amp;output)[LENGTH], ScanOp scan_op, T prefix, bool apply_prefix=true)</td></tr>
<tr class="memdesc:gadb4aed8a804827b6fb97eca790572099"><td class="mdescLeft">&#160;</td><td class="mdescRight">Perform a sequential inclusive prefix scan over the statically-sized <code>input</code> array, seeded with the specified <code>prefix</code>. The aggregate is returned.  <a href="#gadb4aed8a804827b6fb97eca790572099">More...</a><br/></td></tr>
<tr class="separator:gadb4aed8a804827b6fb97eca790572099"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="ga48320d1f549b7931ae1f72040f9e42dc"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;int LENGTH, typename T , typename ReductionOp &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">__device__ __forceinline__ T cub::ThreadReduce </td>
          <td>(</td>
          <td class="paramtype">T *&#160;</td>
          <td class="paramname"><em>input</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">ReductionOp&#160;</td>
          <td class="paramname"><em>reduction_op</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">T&#160;</td>
          <td class="paramname"><em>prefix</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Perform a sequential reduction over <code>LENGTH</code> elements of the <code>input</code> array, seeded with the specified <code>prefix</code>. The aggregate is returned. </p>
<dl class="tparams"><dt>Template Parameters</dt><dd>
  <table class="tparams">
    <tr><td class="paramname">LENGTH</td><td>Length of input array </td></tr>
    <tr><td class="paramname">T</td><td><b>[inferred]</b> The data type to be reduced. </td></tr>
    <tr><td class="paramname">ScanOp</td><td><b>[inferred]</b> Binary reduction operator type having member <code>T operator()(const T &amp;a, const T &amp;b)</code> </td></tr>
  </table>
  </dd>
</dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">input</td><td>Input array </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">reduction_op</td><td>Binary reduction operator </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">prefix</td><td>Prefix to seed reduction with </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="thread__reduce_8cuh_source.html#l00066">66</a> of file <a class="el" href="thread__reduce_8cuh_source.html">thread_reduce.cuh</a>.</p>

</div>
</div>
<a class="anchor" id="gaeafffc414146089dec3bf734a0022b23"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;int LENGTH, typename T , typename ReductionOp &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">__device__ __forceinline__ T cub::ThreadReduce </td>
          <td>(</td>
          <td class="paramtype">T *&#160;</td>
          <td class="paramname"><em>input</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">ReductionOp&#160;</td>
          <td class="paramname"><em>reduction_op</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Perform a sequential reduction over <code>LENGTH</code> elements of the <code>input</code> array. The aggregate is returned. </p>
<dl class="tparams"><dt>Template Parameters</dt><dd>
  <table class="tparams">
    <tr><td class="paramname">LENGTH</td><td>Length of input array </td></tr>
    <tr><td class="paramname">T</td><td><b>[inferred]</b> The data type to be reduced. </td></tr>
    <tr><td class="paramname">ScanOp</td><td><b>[inferred]</b> Binary reduction operator type having member <code>T operator()(const T &amp;a, const T &amp;b)</code> </td></tr>
  </table>
  </dd>
</dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">input</td><td>Input array </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">reduction_op</td><td>Binary reduction operator </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="thread__reduce_8cuh_source.html#l00092">92</a> of file <a class="el" href="thread__reduce_8cuh_source.html">thread_reduce.cuh</a>.</p>

</div>
</div>
<a class="anchor" id="gaa532e530f559bb9922754bd610f5fe84"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;int LENGTH, typename T , typename ReductionOp &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">__device__ __forceinline__ T cub::ThreadReduce </td>
          <td>(</td>
          <td class="paramtype">T(&amp;)&#160;</td>
          <td class="paramname"><em>input</em>[LENGTH], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">ReductionOp&#160;</td>
          <td class="paramname"><em>reduction_op</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">T&#160;</td>
          <td class="paramname"><em>prefix</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Perform a sequential reduction over the statically-sized <code>input</code> array, seeded with the specified <code>prefix</code>. The aggregate is returned. </p>
<dl class="tparams"><dt>Template Parameters</dt><dd>
  <table class="tparams">
    <tr><td class="paramname">LENGTH</td><td><b>[inferred]</b> Length of <code>input</code> array </td></tr>
    <tr><td class="paramname">T</td><td><b>[inferred]</b> The data type to be reduced. </td></tr>
    <tr><td class="paramname">ScanOp</td><td><b>[inferred]</b> Binary reduction operator type having member <code>T operator()(const T &amp;a, const T &amp;b)</code> </td></tr>
  </table>
  </dd>
</dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">input</td><td>Input array </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">reduction_op</td><td>Binary reduction operator </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">prefix</td><td>Prefix to seed reduction with </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="thread__reduce_8cuh_source.html#l00112">112</a> of file <a class="el" href="thread__reduce_8cuh_source.html">thread_reduce.cuh</a>.</p>

</div>
</div>
<a class="anchor" id="ga5d4d3204c873db5af48a3a3f831a9ef8"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;int LENGTH, typename T , typename ReductionOp &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">__device__ __forceinline__ T cub::ThreadReduce </td>
          <td>(</td>
          <td class="paramtype">T(&amp;)&#160;</td>
          <td class="paramname"><em>input</em>[LENGTH], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">ReductionOp&#160;</td>
          <td class="paramname"><em>reduction_op</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Serial reduction with the specified operator. </p>
<dl class="tparams"><dt>Template Parameters</dt><dd>
  <table class="tparams">
    <tr><td class="paramname">LENGTH</td><td><b>[inferred]</b> Length of <code>input</code> array </td></tr>
    <tr><td class="paramname">T</td><td><b>[inferred]</b> The data type to be reduced. </td></tr>
    <tr><td class="paramname">ScanOp</td><td><b>[inferred]</b> Binary reduction operator type having member <code>T operator()(const T &amp;a, const T &amp;b)</code> </td></tr>
  </table>
  </dd>
</dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">input</td><td>Input array </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">reduction_op</td><td>Binary reduction operator </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="thread__reduce_8cuh_source.html#l00132">132</a> of file <a class="el" href="thread__reduce_8cuh_source.html">thread_reduce.cuh</a>.</p>

</div>
</div>
<a class="anchor" id="ga37fa2b0ca9bb32096517480e98894545"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;int LENGTH, typename T , typename ScanOp &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">__device__ __forceinline__ T cub::ThreadScanExclusive </td>
          <td>(</td>
          <td class="paramtype">T *&#160;</td>
          <td class="paramname"><em>input</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">T *&#160;</td>
          <td class="paramname"><em>output</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">ScanOp&#160;</td>
          <td class="paramname"><em>scan_op</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">T&#160;</td>
          <td class="paramname"><em>prefix</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>apply_prefix</em> = <code>true</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Perform a sequential exclusive prefix scan over <code>LENGTH</code> elements of the <code>input</code> array, seeded with the specified <code>prefix</code>. The aggregate is returned. </p>
<dl class="tparams"><dt>Template Parameters</dt><dd>
  <table class="tparams">
    <tr><td class="paramname">LENGTH</td><td>Length of <code>input</code> and <code>output</code> arrays </td></tr>
    <tr><td class="paramname">T</td><td><b>[inferred]</b> The data type to be scanned. </td></tr>
    <tr><td class="paramname">ScanOp</td><td><b>[inferred]</b> Binary scan operator type having member <code>T operator()(const T &amp;a, const T &amp;b)</code> </td></tr>
  </table>
  </dd>
</dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">input</td><td>Input array </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">output</td><td>Output array (may be aliased to <code>input</code>) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">scan_op</td><td>Binary scan operator </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">prefix</td><td>Prefix to seed scan with </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">apply_prefix</td><td>Whether or not the calling thread should apply its prefix. <a class="el" href="structcub_1_1_if.html" title="Type selection (IF ? ThenType : ElseType) ">If</a> not, the first output element is undefined. (Handy for preventing thread-0 from applying a prefix.) </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="thread__scan_8cuh_source.html#l00066">66</a> of file <a class="el" href="thread__scan_8cuh_source.html">thread_scan.cuh</a>.</p>

</div>
</div>
<a class="anchor" id="ga145ad5e3b05134aef8d86f84df9c25b8"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;int LENGTH, typename T , typename ScanOp &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">__device__ __forceinline__ T cub::ThreadScanExclusive </td>
          <td>(</td>
          <td class="paramtype">T(&amp;)&#160;</td>
          <td class="paramname"><em>input</em>[LENGTH], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">T(&amp;)&#160;</td>
          <td class="paramname"><em>output</em>[LENGTH], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">ScanOp&#160;</td>
          <td class="paramname"><em>scan_op</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">T&#160;</td>
          <td class="paramname"><em>prefix</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>apply_prefix</em> = <code>true</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Perform a sequential exclusive prefix scan over the statically-sized <code>input</code> array, seeded with the specified <code>prefix</code>. The aggregate is returned. </p>
<dl class="tparams"><dt>Template Parameters</dt><dd>
  <table class="tparams">
    <tr><td class="paramname">LENGTH</td><td><b>[inferred]</b> Length of <code>input</code> and <code>output</code> arrays </td></tr>
    <tr><td class="paramname">T</td><td><b>[inferred]</b> The data type to be scanned. </td></tr>
    <tr><td class="paramname">ScanOp</td><td><b>[inferred]</b> Binary scan operator type having member <code>T operator()(const T &amp;a, const T &amp;b)</code> </td></tr>
  </table>
  </dd>
</dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">input</td><td>Input array </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">output</td><td>Output array (may be aliased to <code>input</code>) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">scan_op</td><td>Binary scan operator </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">prefix</td><td>Prefix to seed scan with </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">apply_prefix</td><td>Whether or not the calling thread should apply its prefix. (Handy for preventing thread-0 from applying a prefix.) </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="thread__scan_8cuh_source.html#l00104">104</a> of file <a class="el" href="thread__scan_8cuh_source.html">thread_scan.cuh</a>.</p>

</div>
</div>
<a class="anchor" id="ga4004b2a6bfb2b4f024b0389e9c46074c"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;int LENGTH, typename T , typename ScanOp &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">__device__ __forceinline__ T cub::ThreadScanInclusive </td>
          <td>(</td>
          <td class="paramtype">T *&#160;</td>
          <td class="paramname"><em>input</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">T *&#160;</td>
          <td class="paramname"><em>output</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">ScanOp&#160;</td>
          <td class="paramname"><em>scan_op</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Perform a sequential inclusive prefix scan over <code>LENGTH</code> elements of the <code>input</code> array. The aggregate is returned. </p>
<dl class="tparams"><dt>Template Parameters</dt><dd>
  <table class="tparams">
    <tr><td class="paramname">LENGTH</td><td>Length of <code>input</code> and <code>output</code> arrays </td></tr>
    <tr><td class="paramname">T</td><td><b>[inferred]</b> The data type to be scanned. </td></tr>
    <tr><td class="paramname">ScanOp</td><td><b>[inferred]</b> Binary scan operator type having member <code>T operator()(const T &amp;a, const T &amp;b)</code> </td></tr>
  </table>
  </dd>
</dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">input</td><td>Input array </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">output</td><td>Output array (may be aliased to <code>input</code>) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">scan_op</td><td>Binary scan operator </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="thread__scan_8cuh_source.html#l00126">126</a> of file <a class="el" href="thread__scan_8cuh_source.html">thread_scan.cuh</a>.</p>

</div>
</div>
<a class="anchor" id="gae78193279081a554432b6aea10a7295a"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;int LENGTH, typename T , typename ScanOp &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">__device__ __forceinline__ T cub::ThreadScanInclusive </td>
          <td>(</td>
          <td class="paramtype">T(&amp;)&#160;</td>
          <td class="paramname"><em>input</em>[LENGTH], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">T(&amp;)&#160;</td>
          <td class="paramname"><em>output</em>[LENGTH], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">ScanOp&#160;</td>
          <td class="paramname"><em>scan_op</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Perform a sequential inclusive prefix scan over the statically-sized <code>input</code> array. The aggregate is returned. </p>
<dl class="tparams"><dt>Template Parameters</dt><dd>
  <table class="tparams">
    <tr><td class="paramname">LENGTH</td><td><b>[inferred]</b> Length of <code>input</code> and <code>output</code> arrays </td></tr>
    <tr><td class="paramname">T</td><td><b>[inferred]</b> The data type to be scanned. </td></tr>
    <tr><td class="paramname">ScanOp</td><td><b>[inferred]</b> Binary scan operator type having member <code>T operator()(const T &amp;a, const T &amp;b)</code> </td></tr>
  </table>
  </dd>
</dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">input</td><td>Input array </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">output</td><td>Output array (may be aliased to <code>input</code>) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">scan_op</td><td>Binary scan operator </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="thread__scan_8cuh_source.html#l00157">157</a> of file <a class="el" href="thread__scan_8cuh_source.html">thread_scan.cuh</a>.</p>

</div>
</div>
<a class="anchor" id="ga0e00b3a9b522249581b2ff98f670087b"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;int LENGTH, typename T , typename ScanOp &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">__device__ __forceinline__ T cub::ThreadScanInclusive </td>
          <td>(</td>
          <td class="paramtype">T *&#160;</td>
          <td class="paramname"><em>input</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">T *&#160;</td>
          <td class="paramname"><em>output</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">ScanOp&#160;</td>
          <td class="paramname"><em>scan_op</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">T&#160;</td>
          <td class="paramname"><em>prefix</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>apply_prefix</em> = <code>true</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Perform a sequential inclusive prefix scan over <code>LENGTH</code> elements of the <code>input</code> array, seeded with the specified <code>prefix</code>. The aggregate is returned. </p>
<dl class="tparams"><dt>Template Parameters</dt><dd>
  <table class="tparams">
    <tr><td class="paramname">LENGTH</td><td>Length of <code>input</code> and <code>output</code> arrays </td></tr>
    <tr><td class="paramname">T</td><td><b>[inferred]</b> The data type to be scanned. </td></tr>
    <tr><td class="paramname">ScanOp</td><td><b>[inferred]</b> Binary scan operator type having member <code>T operator()(const T &amp;a, const T &amp;b)</code> </td></tr>
  </table>
  </dd>
</dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">input</td><td>Input array </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">output</td><td>Output array (may be aliased to <code>input</code>) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">scan_op</td><td>Binary scan operator </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">prefix</td><td>Prefix to seed scan with </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">apply_prefix</td><td>Whether or not the calling thread should apply its prefix. (Handy for preventing thread-0 from applying a prefix.) </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="thread__scan_8cuh_source.html#l00177">177</a> of file <a class="el" href="thread__scan_8cuh_source.html">thread_scan.cuh</a>.</p>

</div>
</div>
<a class="anchor" id="gadb4aed8a804827b6fb97eca790572099"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;int LENGTH, typename T , typename ScanOp &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">__device__ __forceinline__ T cub::ThreadScanInclusive </td>
          <td>(</td>
          <td class="paramtype">T(&amp;)&#160;</td>
          <td class="paramname"><em>input</em>[LENGTH], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">T(&amp;)&#160;</td>
          <td class="paramname"><em>output</em>[LENGTH], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">ScanOp&#160;</td>
          <td class="paramname"><em>scan_op</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">T&#160;</td>
          <td class="paramname"><em>prefix</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>apply_prefix</em> = <code>true</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Perform a sequential inclusive prefix scan over the statically-sized <code>input</code> array, seeded with the specified <code>prefix</code>. The aggregate is returned. </p>
<dl class="tparams"><dt>Template Parameters</dt><dd>
  <table class="tparams">
    <tr><td class="paramname">LENGTH</td><td><b>[inferred]</b> Length of <code>input</code> and <code>output</code> arrays </td></tr>
    <tr><td class="paramname">T</td><td><b>[inferred]</b> The data type to be scanned. </td></tr>
    <tr><td class="paramname">ScanOp</td><td><b>[inferred]</b> Binary scan operator type having member <code>T operator()(const T &amp;a, const T &amp;b)</code> </td></tr>
  </table>
  </dd>
</dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">input</td><td>Input array </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">output</td><td>Output array (may be aliased to <code>input</code>) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">scan_op</td><td>Binary scan operator </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">prefix</td><td>Prefix to seed scan with </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">apply_prefix</td><td>Whether or not the calling thread should apply its prefix. (Handy for preventing thread-0 from applying a prefix.) </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="thread__scan_8cuh_source.html#l00214">214</a> of file <a class="el" href="thread__scan_8cuh_source.html">thread_scan.cuh</a>.</p>

</div>
</div>
</div><!-- contents -->
<!-- HTML footer for doxygen 1.8.3.1-->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Fri Aug 23 2013 17:31:10 for CUB by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.4
<br>
&copy; 2013 NVIDIA Corporation
</small></address>
</body>
</html>
